#include <iostream>

using namespace std;
int main()
{
  int n,i,Sum = 0, k = 0;
  cout << "Vvedite chislo : " << endl;
  cin >> n;
  while(Sum <= n)
  {
    k++;
    Sum += k;
  }
  cout << "Chislo:  " << k - 1 << "\nSumma: " << Sum - k << endl;

  return 0;
}
